function fn(str:string):string {
    return str.split('').reverse().join('')
}
console.log(fn("abc"));

function fn1(arr:Array<string>):any {
    return arr.sort((a,b)=>{
        return b.length-a.length
    })[0]
}
console.log(fn1(['aaaaaaaaaaaa','eeeee','y']));

function fn3(str1:string):string {
    let strs=str1.split(' ')
    let newStrs=strs[0]
   for (let i = 1; i < strs.length; i++) {
     newStrs+=strs[i][0].toUpperCase()+strs[i].slice(1)+' '
   }
   return newStrs
}
console.log(fn3( " hello word is qing shan wang shui"));

